<template>
  <el-dialog title="新增用户"
             :visible.sync="visiable">
    <el-form :model="formData">
      <el-row>
        <el-col :span="12">
          <el-form-item label="ID"
                        :label-width="formLabelWidth">
            <el-input size="small"
                      disabled
                      v-model="formData.id"
                      autocomplete="off"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="姓名"
                        :label-width="formLabelWidth">
            <el-input size="small"
                      disabled
                      v-model="formData.name"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="性别"
                        :label-width="formLabelWidth">
            <el-input size="small"
                      v-model="formData.sex"
                      autocomplete="off"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="身高"
                        :label-width="formLabelWidth">
            <el-input size="small"
                      v-model="formData.height"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="年龄"
                        :label-width="formLabelWidth">
            <el-input size="small"
                      v-model="formData.sex"
                      autocomplete="off"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="电话"
                        :label-width="formLabelWidth">
            <el-input size="small"
                      v-model="formData.phone"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="Email"
                        :label-width="formLabelWidth">
            <el-input size="small"
                      v-model="formData.email"
                      autocomplete="off"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="地址"
                        :label-width="formLabelWidth">
            <el-input size="small"
                      v-model="formData.address"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div slot="footer"
         class="dialog-footer">
      <el-button @click="dialogFormVisible = false">取 消</el-button>
      <el-button type="primary"
                 @click="dialogFormVisible = false">确 定</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  props: {
    formData: {
      type: Object,
      required: true
    },
    visiable: {
      type: Boolean,
      required: true
    }
  },
  data () {
    return {
      gridData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }],
      dialogFormVisible: true,
      form: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: ''
      },
      formLabelWidth: '80px'
    };
  }
}
</script>

<style lang="less">
.el-form {
  .el-form-item {
    .el-form-item__label {
      font-weight: 700;
    }
  }
}
</style>